home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44a.zip / MIS005.QM < prev    next >
Text File  |  1992-02-17  |  11KB  |  213 lines

  1. *                               mis005.qm
  2. *           Miscellaneous Macros to Make Single Column Macros
  3. *                        Written By Tom Hogshead
  4. *                       [ See MISCxx.QM For Use ]
  5. *                                2/17/92
  6. *  Key    Subfile              Description
  7. * =====  =========      =================================================
  8. * @(6)                  Make Single Column Macro of QMAC Output
  9. * @(7)                  Make Single Column Macro, User Controlled
  10. * @(8)                  Make Single Column Macro, Automatic
  11. * @(9)                  Convert Single Column Macro to Wide, User Control
  12. * @(0)                  Convert Single Column Macro to Wide, Automatic
  13. * @(j)                  Join Lines with Single Space at Join Point
  14. * @(F9)                 WordLeft  For Use With @7
  15. * @(F10)                WordRight For Use With @7
  16. *
  17. *        {e:\up\MISC*}  Return To MISCxx.QM
  18. *        {e:\up\PAUSE*} Return To PAUSExx.QM, Macros to Single Step Macros
  19. *
  20. *-- eoi
  21.  
  22. *              M A C R O S - Some require QEdit v2.15
  23. * ----------------------------------------------------------------------
  24. * @(6) Makes Single Column Macro of QMAC Output TextFile
  25. * ----------------------------------------------------------------------
  26. * This macro will make a single column macro of QMAC output of the file
  27. * being edited.  If a macro is not a marked block, all macros in the
  28. * file are made into single column macros.
  29.  
  30. @6     macrobegin
  31.         endline cursorright writeblock "c:$.qm" return "O" backspace begline
  32.         DOS "qmacB c:$"   return return                     * Make macfile
  33.         DOS "qmacT-n c:$" return return                     * Make txtfile
  34.         editfile "c:$.qm" return quit editfile return
  35.         endfile addline "*" cursorright
  36.         insertdate inserttime killfile                      * Date stamp
  37. *
  38. * 98 bytes Fri  09-14-1990  14:06:30
  39. * 103 bytes Fri  10-18-1991  14:56:58 (TH @F1 in MACRxx.QM)
  40. * 95 bytes Thu  11-14-1991  22:42:20 (TH @6, removed currentfilename)
  41.  
  42. *   ┌───────────────────────── QMACB.BAT ──────────────────────────────┐
  43. *   │ @echo off                                                        │
  44. *   │ rem qmacB.bat                   Sun  09-30-1990                  │
  45. *   │         cls                                                      │
  46. *   │         echo Converts %1.QM (text) To %1.MAC (binary)            │
  47. *   │         if not exist %1.QM goto NOTEXIST                         │
  48. *   │         QMAC   %1.MAC      %1.QM   /B /A-       %2 %3            │
  49. *   │         goto END                                                 │
  50. *   │ :NOTEXIST                                                        │
  51. *   │         echo %1.QM does not exist                               │
  52. *   │ :END                                                             │
  53. *   └──────────────────────────────────────────────────────────────────┘
  54. *   ┌────────────────────────── QMACT-N.BAT ───────────────────────────┐
  55. *   │ @echo off                                                        │
  56. *   │ rem qmacT-n.bat for single column txtfile       Sun  09-30-1990  │
  57. *   │         cls                                                      │
  58. *   │         echo Converts %1.MAC (binary) To %1.QM (text)            │
  59. *   │         if not exist %1.MAC goto NOTEXIST                        │
  60. *   │         QMAC   %1.MAC      %1.QM   /T /A- /W15  %2 %3            │
  61. *   │         goto END                                                 │
  62. *   │ :NOTEXIST                                                        │
  63. *   │         echo %1.QM does not exist                               │
  64. *   │ :END                                                             │
  65. *   └──────────────────────────────────────────────────────────────────┘
  66.  
  67. * 
  68. * ----------------------------------------------------------------------
  69. * @(7) Make Single Column Macro, User Controlled
  70. * ----------------------------------------------------------------------
  71. * This macro enables the user to make a single column macro and control
  72. * where lines will be split.  To run, place the cursor line on the first
  73. * line of the block, execute the macro, and at the first Pause cursor
  74. * down to the desired end of block and hit <enter>.  Alternatively, the
  75. * block may be marked before execution as any type block (open or
  76. * closed).
  77.  
  78. * At each Pause thereafter, continue pressing <enter> until the last
  79. * desired word on the line has been split, then cursor down to next
  80. * line if not already there and continue pressing <enter>, etc.  At
  81. * anytime while macro is executing, cursordown or cursoup, and @F7 or
  82. * @f8 may be used to move to and split wordleft and wordright.  The
  83. * macro stops when the cursor reaches the blank line at the end of the
  84. * marked blocked, if any blank line exists in the block, or if Esc is
  85. * pressed three times.
  86.  
  87. @7      macrobegin
  88.         gotoblockend jtrue OK markline gotoblockend jtrue OK Pause markline
  89.     OK: addline gotoblockbeg
  90.         maketopofscreen
  91.  START: begline
  92.  WORDR: wordright
  93.   TEST: isemptyline jtrue END
  94.         markword gotoblockend unmarkblock cursorright isendline jtrue WORDR
  95.         setscreenon
  96.         Pause
  97.         setscreenoff
  98.         splitline splitline cursordown gotocolumn "9" return
  99.         cursorright joinline cursorleft delrtword jump START
  100.    END: unmarkblock delline
  101. *
  102. * 51 bytes Fri  11-15-1991  12:27:09 (TH @7)
  103.  
  104. * 
  105. * ----------------------------------------------------------------------
  106. * @(F9) and @(F10) For Use With @7
  107. * ----------------------------------------------------------------------
  108. @F9  wordleft
  109. @F10 wordright
  110.  
  111. * 
  112. * ----------------------------------------------------------------------
  113. * @(8) Split Macro Into Single Column Macro, Maintain Label Positions
  114. * ----------- Revised 90 bytes Sat  11-16-1991  14:52:56 ---------------
  115. * This macro makes a single column macro from any portion of a macro
  116. * marked as any type block before or during macro execution.  To run,
  117. * place the cursor line on the first line of the block.  Execute the
  118. * macro.  At the Pause, cursor down to the desired end of block and hit
  119. * <enter>.  Alternatively, the block may be marked before execution as
  120. * any type block (open or closed).  The macro stops when the cursor
  121. * reaches the blank line indicating the end of the marked blocked or if
  122. * a blank line exists in the block.
  123.  
  124. * This macro attemps to not split words beginning with "j" which are
  125. * assumed to be jtrue, jfalse or jump.  Labels following "j" statements
  126. * may be on the same line or the next line and may or may not be
  127. * followed.   This macro will not split any line containing an asterisk
  128. * "*" unless the line immediately follows a "j" word.  Please be aware
  129. * that the single column macros produced by @8 is not a "perfect"
  130. * single column macro and will probably have to be edited to your
  131. * preferences.  If you want macro to make a "perfect" single column
  132. * macro use @6, or one to your preference, use @7.  Lines which do not
  133. * get split because of their proximity to 'j' words and/or lines with
  134. * asterisks may be split by running @8 just on these lines a second
  135. * time.
  136.  
  137. @8      macrobegin
  138.         gotoblockend jtrue OK markline gotoblockend jtrue OK Pause markline
  139.     OK: addline gotoblockbeg
  140.  START: setscreenon setscreenoff begline
  141.  WORDR: wordright
  142.   MARK: markline Find "*" return "GL" return jfalse TEST cursordown jump MARK
  143.   TEST: isemptyline jtrue END markword cursorleft markcolumn Find " j" return
  144.         "GLI" return jfalse NOEOL gotoblockend wordright jump MARK        * |
  145.         * In case line with comments follows "j" word, need jump MARK
  146.  NOEOL: markword gotoblockend unmarkblock cursorright isendline jtrue WORDR
  147.         splitline splitline cursordown gotocolumn "9" return
  148.         cursorright joinline cursorleft delrtword jump START
  149.    END: unmarkblock delline
  150. *
  151. * 99 bytes Wed  11-13-1991  13:41:44 (TH @8)
  152. * 99 bytes Thu  11-14-1991  00:53:29 (TH @8, corrected for comments/end)
  153. * 87 bytes Fri  11-15-1991  11:42:13 (TH @8, shorter, faster)
  154. * 90 bytes Sat  11-16-1991  14:52:56 (TH @8, for comments after 'j' words |)
  155.  
  156. * 
  157. * ----------------------------------------------------------------------
  158. * @(9) Convert Single Column Macro to Wide, User Controlled
  159. * ----------------------------------------------------------------------
  160. * This macro enables the user to return a single column macro to a wide
  161. * macro.  To run, place the cursor line on the first line of the block,
  162. * execute the macro, and at the first Pause cursor down to the desired
  163. * end of block and hit <enter>.  Alternatively, the block may be marked
  164. * before execution as any type block (open or closed).
  165.  
  166. * At each Pause thereafter, continue pressing <enter> until the desired
  167. * line width is achieved, then cursor down to next line and continuing
  168. * pressing <enter>, etc.  The macro stops when the cursor reaches the
  169. * blank line at the end of the marked blocked, if any blank line exists
  170. * in the block or if Esc is pressed three times.
  171.  
  172. @9      macrobegin
  173.         gotoblockend jtrue OK markline gotoblockend jtrue OK Pause markline
  174.     OK: addline gotoblockbeg unmarkblock insertline cursordown
  175.         maketopofscreen
  176.      1: cursordown isemptyline jtrue 2 cursorup endline
  177.         cursorright Pause cursorright joinline cursorleft delrtword jump 1
  178. *         cursorright cursorright joinline cursorleft delrtword Pause jump 1
  179.      2: delline prevpara cursorup delline
  180. *
  181. * 40 bytes Thu  11-14-1991  01:40:35 (TH @9)
  182. * 41 bytes Fri  11-15-1991  12:18:25 (TH @9)
  183.  
  184. * 
  185. * ----------------------------------------------------------------------
  186. * @(0) Convert Single Column Macro to Wide, Automatic
  187. * ----------------------------------------------------------------------
  188. * This macro makes any portion of a macro marked as a block a "wide"
  189. * macro.  To run, place the cursor line on the first line of the block,
  190. * execute the macro, and at the Pause, cursor down to the desired end
  191. * of block and hit <enter>.  All commands in the marked block are
  192. * formatted to a right margin of 69, including comments so be careful.
  193. * Alternatively, the block may be marked before execution as any type
  194. * block (open or closed).
  195.  
  196. @0      macrobegin
  197.         setrmargin "69" return
  198.         gotoblockend jtrue OK markline gotoblockend jtrue OK Pause markline
  199.     OK: addline gotoblockbeg unmarkblock insertline cursordown
  200.      1: wrappara isemptyline jtrue 2 cursorup
  201.      2: delline prevpara cursorup delline
  202. *
  203. * 36 bytes Thu  11-14-1991  01:11:58 (TH @0)
  204.  
  205. * 
  206. * ----------------------------------------------------------------------
  207. * @(j) Join Lines with Single Space at Join Point, by John Goodman
  208. * ----------------------------------------------------------------------
  209. @j      macrobegin
  210.         endline cursorright cursorright joinline cursorleft delrtword
  211. * 10 bytes Fri  07-26-1991  19:30:39 (JG @j in RFRMxx.QM rfr007.qm)
  212.  
  213.